3.387 \(\int \sqrt{\frac{-a+b x^2}{x^2}} \, dx\)

Optimal. Leaf size=43 \[ x \sqrt{b-\frac{a}{x^2}}+\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b-\frac{a}{x^2}}}\right ) \]

[Out]

Sqrt[b - a/x^2]*x + Sqrt[a]*ArcTan[Sqrt[a]/(Sqrt[b - a/x^2]*x)]

________________________________________________________________________________________

Rubi [A]  time = 0.023209, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294, Rules used = {1972, 242, 277, 217, 203} \[ x \sqrt{b-\frac{a}{x^2}}+\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b-\frac{a}{x^2}}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[(-a + b*x^2)/x^2],x]

[Out]

Sqrt[b - a/x^2]*x + Sqrt[a]*ArcTan[Sqrt[a]/(Sqrt[b - a/x^2]*x)]

Rule 1972

Int[(u_)^(p_), x_Symbol] :> Int[ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && BinomialQ[u, x] &&  !BinomialMatchQ[
u, x]

Rule 242

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^2, x], x, 1/x] /; FreeQ[{a, b, p},
x] && ILtQ[n, 0]

Rule 277

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^p)/(c*(m +
1)), x] - Dist[(b*n*p)/(c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{\frac{-a+b x^2}{x^2}} \, dx &=\int \sqrt{b-\frac{a}{x^2}} \, dx\\ &=-\operatorname{Subst}\left (\int \frac{\sqrt{b-a x^2}}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{b-\frac{a}{x^2}} x+a \operatorname{Subst}\left (\int \frac{1}{\sqrt{b-a x^2}} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{b-\frac{a}{x^2}} x+a \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,\frac{1}{\sqrt{b-\frac{a}{x^2}} x}\right )\\ &=\sqrt{b-\frac{a}{x^2}} x+\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{\sqrt{b-\frac{a}{x^2}} x}\right )\\ \end{align*}

Mathematica [A]  time = 0.0314661, size = 68, normalized size = 1.58 \[ x \sqrt{b-\frac{a}{x^2}}-\frac{\sqrt{a} x \sqrt{b-\frac{a}{x^2}} \tan ^{-1}\left (\frac{\sqrt{b x^2-a}}{\sqrt{a}}\right )}{\sqrt{b x^2-a}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[(-a + b*x^2)/x^2],x]

[Out]

Sqrt[b - a/x^2]*x - (Sqrt[a]*Sqrt[b - a/x^2]*x*ArcTan[Sqrt[-a + b*x^2]/Sqrt[a]])/Sqrt[-a + b*x^2]

________________________________________________________________________________________

Maple [B]  time = 0.008, size = 81, normalized size = 1.9 \begin{align*}{x\sqrt{{\frac{b{x}^{2}-a}{{x}^{2}}}} \left ( a\ln \left ( 2\,{\frac{\sqrt{-a}\sqrt{b{x}^{2}-a}-a}{x}} \right ) +\sqrt{-a}\sqrt{b{x}^{2}-a} \right ){\frac{1}{\sqrt{-a}}}{\frac{1}{\sqrt{b{x}^{2}-a}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((b*x^2-a)/x^2)^(1/2),x)

[Out]

((b*x^2-a)/x^2)^(1/2)*x*(a*ln(2*((-a)^(1/2)*(b*x^2-a)^(1/2)-a)/x)+(-a)^(1/2)*(b*x^2-a)^(1/2))/(-a)^(1/2)/(b*x^
2-a)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((b*x^2-a)/x^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 0.75714, size = 259, normalized size = 6.02 \begin{align*} \left [x \sqrt{\frac{b x^{2} - a}{x^{2}}} + \frac{1}{2} \, \sqrt{-a} \log \left (-\frac{b x^{2} - 2 \, \sqrt{-a} x \sqrt{\frac{b x^{2} - a}{x^{2}}} - 2 \, a}{x^{2}}\right ), x \sqrt{\frac{b x^{2} - a}{x^{2}}} + \sqrt{a} \arctan \left (\frac{\sqrt{a} x \sqrt{\frac{b x^{2} - a}{x^{2}}}}{b x^{2} - a}\right )\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((b*x^2-a)/x^2)^(1/2),x, algorithm="fricas")

[Out]

[x*sqrt((b*x^2 - a)/x^2) + 1/2*sqrt(-a)*log(-(b*x^2 - 2*sqrt(-a)*x*sqrt((b*x^2 - a)/x^2) - 2*a)/x^2), x*sqrt((
b*x^2 - a)/x^2) + sqrt(a)*arctan(sqrt(a)*x*sqrt((b*x^2 - a)/x^2)/(b*x^2 - a))]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{- a + b x^{2}}{x^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((b*x**2-a)/x**2)**(1/2),x)

[Out]

Integral(sqrt((-a + b*x**2)/x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.22661, size = 86, normalized size = 2. \begin{align*} -{\left (\sqrt{a} \arctan \left (\frac{\sqrt{b x^{2} - a}}{\sqrt{a}}\right ) - \sqrt{b x^{2} - a}\right )} \mathrm{sgn}\left (x\right ) +{\left (\sqrt{a} \arctan \left (\frac{\sqrt{-a}}{\sqrt{a}}\right ) - \sqrt{-a}\right )} \mathrm{sgn}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((b*x^2-a)/x^2)^(1/2),x, algorithm="giac")

[Out]

-(sqrt(a)*arctan(sqrt(b*x^2 - a)/sqrt(a)) - sqrt(b*x^2 - a))*sgn(x) + (sqrt(a)*arctan(sqrt(-a)/sqrt(a)) - sqrt
(-a))*sgn(x)